package com.vcms.cms.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Site entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "site", catalog = "vcms_0.1")
public class Site implements java.io.Serializable {

	// Fields

	private Integer siteId;
	private String domain;
	private String sitePath;
	private String siteName;
	private String shortName;
	private String protocol;
	private String dynamicSuffix;
	private String staticSuffix;
	private Boolean isIndexToRoot;
	private Boolean isStaticIndex;
	private String localeAdmin;
	private String localeFront;
	private String tplSolution;
	private Boolean finalStep;
	private Boolean afterCheck;
	private Boolean isRelativePath;
	private Boolean isRecycleOn;
	private String domainAlias;
	private String domainRedirect;
	private Boolean isMaster;
	private Set<SiteAttr> siteAttrs = new HashSet<SiteAttr>(0);
	private Set<UserSite> userSites = new HashSet<UserSite>(0);
	private Set<Comment> comments = new HashSet<Comment>(0);
	private Set<Config> configs = new HashSet<Config>(0);
	private Set<Guestbook> guestbooks = new HashSet<Guestbook>(0);
	private Set<Keyword> keywords = new HashSet<Keyword>(0);
	private Set<VoteTopic> voteTopics = new HashSet<VoteTopic>(0);
	private Set<Role> roles = new HashSet<Role>(0);

	// Constructors

	/** default constructor */
	public Site() {
	}

	/** full constructor */
	public Site(String domain, String sitePath, String siteName,
			String shortName, String protocol, String dynamicSuffix,
			String staticSuffix, Boolean isIndexToRoot, Boolean isStaticIndex,
			String localeAdmin, String localeFront, String tplSolution,
			Boolean finalStep, Boolean afterCheck, Boolean isRelativePath,
			Boolean isRecycleOn, String domainAlias, String domainRedirect,
			Boolean isMaster, Set<SiteAttr> siteAttrs, Set<UserSite> userSites,
			Set<Comment> comments, Set<Config> configs,
			Set<Guestbook> guestbooks, Set<Keyword> keywords,
			Set<VoteTopic> voteTopics, Set<Role> roles) {
		this.domain = domain;
		this.sitePath = sitePath;
		this.siteName = siteName;
		this.shortName = shortName;
		this.protocol = protocol;
		this.dynamicSuffix = dynamicSuffix;
		this.staticSuffix = staticSuffix;
		this.isIndexToRoot = isIndexToRoot;
		this.isStaticIndex = isStaticIndex;
		this.localeAdmin = localeAdmin;
		this.localeFront = localeFront;
		this.tplSolution = tplSolution;
		this.finalStep = finalStep;
		this.afterCheck = afterCheck;
		this.isRelativePath = isRelativePath;
		this.isRecycleOn = isRecycleOn;
		this.domainAlias = domainAlias;
		this.domainRedirect = domainRedirect;
		this.isMaster = isMaster;
		this.siteAttrs = siteAttrs;
		this.userSites = userSites;
		this.comments = comments;
		this.configs = configs;
		this.guestbooks = guestbooks;
		this.keywords = keywords;
		this.voteTopics = voteTopics;
		this.roles = roles;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "siteId", unique = true, nullable = false)
	public Integer getSiteId() {
		return this.siteId;
	}

	public void setSiteId(Integer siteId) {
		this.siteId = siteId;
	}

	@Column(name = "domain", length = 100)
	public String getDomain() {
		return this.domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	@Column(name = "sitePath", length = 100)
	public String getSitePath() {
		return this.sitePath;
	}

	public void setSitePath(String sitePath) {
		this.sitePath = sitePath;
	}

	@Column(name = "siteName", length = 100)
	public String getSiteName() {
		return this.siteName;
	}

	public void setSiteName(String siteName) {
		this.siteName = siteName;
	}

	@Column(name = "shortName", length = 100)
	public String getShortName() {
		return this.shortName;
	}

	public void setShortName(String shortName) {
		this.shortName = shortName;
	}

	@Column(name = "protocol", length = 50)
	public String getProtocol() {
		return this.protocol;
	}

	public void setProtocol(String protocol) {
		this.protocol = protocol;
	}

	@Column(name = "dynamicSuffix", length = 50)
	public String getDynamicSuffix() {
		return this.dynamicSuffix;
	}

	public void setDynamicSuffix(String dynamicSuffix) {
		this.dynamicSuffix = dynamicSuffix;
	}

	@Column(name = "staticSuffix", length = 50)
	public String getStaticSuffix() {
		return this.staticSuffix;
	}

	public void setStaticSuffix(String staticSuffix) {
		this.staticSuffix = staticSuffix;
	}

	@Column(name = "isIndexToRoot")
	public Boolean getIsIndexToRoot() {
		return this.isIndexToRoot;
	}

	public void setIsIndexToRoot(Boolean isIndexToRoot) {
		this.isIndexToRoot = isIndexToRoot;
	}

	@Column(name = "isStaticIndex")
	public Boolean getIsStaticIndex() {
		return this.isStaticIndex;
	}

	public void setIsStaticIndex(Boolean isStaticIndex) {
		this.isStaticIndex = isStaticIndex;
	}

	@Column(name = "localeAdmin", length = 50)
	public String getLocaleAdmin() {
		return this.localeAdmin;
	}

	public void setLocaleAdmin(String localeAdmin) {
		this.localeAdmin = localeAdmin;
	}

	@Column(name = "localeFront", length = 50)
	public String getLocaleFront() {
		return this.localeFront;
	}

	public void setLocaleFront(String localeFront) {
		this.localeFront = localeFront;
	}

	@Column(name = "tplSolution", length = 50)
	public String getTplSolution() {
		return this.tplSolution;
	}

	public void setTplSolution(String tplSolution) {
		this.tplSolution = tplSolution;
	}

	@Column(name = "finalStep")
	public Boolean getFinalStep() {
		return this.finalStep;
	}

	public void setFinalStep(Boolean finalStep) {
		this.finalStep = finalStep;
	}

	@Column(name = "afterCheck")
	public Boolean getAfterCheck() {
		return this.afterCheck;
	}

	public void setAfterCheck(Boolean afterCheck) {
		this.afterCheck = afterCheck;
	}

	@Column(name = "isRelativePath")
	public Boolean getIsRelativePath() {
		return this.isRelativePath;
	}

	public void setIsRelativePath(Boolean isRelativePath) {
		this.isRelativePath = isRelativePath;
	}

	@Column(name = "isRecycleOn")
	public Boolean getIsRecycleOn() {
		return this.isRecycleOn;
	}

	public void setIsRecycleOn(Boolean isRecycleOn) {
		this.isRecycleOn = isRecycleOn;
	}

	@Column(name = "domainAlias", length = 300)
	public String getDomainAlias() {
		return this.domainAlias;
	}

	public void setDomainAlias(String domainAlias) {
		this.domainAlias = domainAlias;
	}

	@Column(name = "domainRedirect", length = 300)
	public String getDomainRedirect() {
		return this.domainRedirect;
	}

	public void setDomainRedirect(String domainRedirect) {
		this.domainRedirect = domainRedirect;
	}

	@Column(name = "isMaster")
	public Boolean getIsMaster() {
		return this.isMaster;
	}

	public void setIsMaster(Boolean isMaster) {
		this.isMaster = isMaster;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "site")
	public Set<SiteAttr> getSiteAttrs() {
		return this.siteAttrs;
	}

	public void setSiteAttrs(Set<SiteAttr> siteAttrs) {
		this.siteAttrs = siteAttrs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "site")
	public Set<UserSite> getUserSites() {
		return this.userSites;
	}

	public void setUserSites(Set<UserSite> userSites) {
		this.userSites = userSites;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "site")
	public Set<Comment> getComments() {
		return this.comments;
	}

	public void setComments(Set<Comment> comments) {
		this.comments = comments;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "site")
	public Set<Config> getConfigs() {
		return this.configs;
	}

	public void setConfigs(Set<Config> configs) {
		this.configs = configs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "site")
	public Set<Guestbook> getGuestbooks() {
		return this.guestbooks;
	}

	public void setGuestbooks(Set<Guestbook> guestbooks) {
		this.guestbooks = guestbooks;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "site")
	public Set<Keyword> getKeywords() {
		return this.keywords;
	}

	public void setKeywords(Set<Keyword> keywords) {
		this.keywords = keywords;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "site")
	public Set<VoteTopic> getVoteTopics() {
		return this.voteTopics;
	}

	public void setVoteTopics(Set<VoteTopic> voteTopics) {
		this.voteTopics = voteTopics;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "site")
	public Set<Role> getRoles() {
		return this.roles;
	}

	public void setRoles(Set<Role> roles) {
		this.roles = roles;
	}

}